package com.easy.cms.base.exception;

import com.easy.cms.base.constant.IErrorCode;

public class CustomException extends RuntimeException {
    public Integer code;
    public CustomException(String message) {
        super(message);
    }

    public CustomException(int code, String message) {
        super(message);
        this.code = code;
    }
    public CustomException(IErrorCode errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }
}